<template>
  <div><iframe style="width: 100%; height: 60vh" ref="myIframe"></iframe></div>
</template>

<script setup>
import { objConfig } from "../../../public/config.js";

import { reactive, ref, toRefs, watch } from "vue";
const props = defineProps({
  workIdParam: {
    type: String,
    default: "",
  },
});
const myIframe = ref(null); // 初始化iframe的地址值
const { proxy } = getCurrentInstance();
defineExpose({ getListSrc });
onMounted(() => {
  myIframe.value.src = objConfig.VITE_APP_PROCESS_API + "/workflow/module/workflow/flow.info.html" + "?workId=" + props.workIdParam; // 设置iframe的地址值
});
watch(
  () => props.workIdParam,
  () => {
    myIframe.value.src = objConfig.VITE_APP_PROCESS_API + "/workflow/module/workflow/flow.info.html" + "?workId=" + props.workIdParam; // 设置iframe的地址值
  }
);
function getListSrc() {
  myIframe.value.src = objConfig.VITE_APP_PROCESS_API + "/workflow/module/workflow/flow.info.html" + "?workId=" + props.workIdParam;
  console.log(myIframe.value.src);
}
</script>

<style lang="scss" scoped></style>
